package com.song.dubbo3service.filter;

/**
 * @Author SHI YUAN
 * @DATE 2022/2/8 2:24 PM
 * @Version 1.0
 * @Desc
 */
public class ThreadLocalUtil {

    private static ThreadLocal<String> threadLocal = new ThreadLocal<>();

    public static String getValue(){
        return threadLocal.get();
    }

    public static void putValue(String value){
        threadLocal.set(value);
    }

    public static void main(String[] args) {

        putValue("xiaohui");
        System.out.println(getValue());
    }
}
